﻿using Dropit.Extension.Core;
using SocialPack.Composer.Extensions;

namespace SocialPack.Composer.modules.SocialPack.Composer.Functions.Facebook
{
    public partial class Comments : BaseContentFunction
    {
        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            if (ContentFunctionData.IsValue("Width"))
            {
                this.CommentsControl.Width = (int)ContentFunctionData.Property["Width"].Value;
            }

            if (ContentFunctionData.IsValue("MaxCount"))
            {
                this.CommentsControl.MaxCount = (int)ContentFunctionData.Property["MaxCount"].Value;
            }

            if (ContentFunctionData.IsValue("CountryCode"))
            {
                this.CommentsControl.CountryCode = ContentFunctionData.Property["CountryCode"].ToString();
            }
        }
    }
}